import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

class Demo3_1_2 {
    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1, 2, 3);
        System.out.println("--------------- filter 前");
        System.out.println(list);
        System.out.println("--------------- filter 后");
        List<Integer> filteredList = list.stream().filter(x -> x > 1).collect(Collectors.toList());
        System.out.println(filteredList);
    }
}